// 通用 API 响应基础类型
interface BaseApiResponse<T = any> {
  code: number; // 返回码,0:成功
  message?: string; // message
  data?: T; // 具体的数据类型，由泛型指定
  dataType?: number; // 返回数据, 1:明文数据, 2:加密数据
  requestId?: string; // 请求ID
}
// 报告对比选择项
interface ReportCompareSelectVO {
  reportId: number;
  institution: string;
  inspectionDate: string;
}
// 风险评估状态枚举
enum RiskAssessmentStatus {
  STATUS_1 = 1,
  STATUS_2 = 2,
  STATUS_3 = 3,
  STATUS_4 = 4
}

//风险评估每一项
interface RiskAssessmentItemVO {
  riskAssessmentId: number; // 风险评估Id
  riskAssessmentUserId: number; // 评估用户ID
  title: string; // 标题
  content: string; // 内容
  status: RiskAssessmentStatus; // 状态
  referenceId: number; // 引用ID
  rejectionReason: string; // 驳回原因
  ai: boolean; // 是否AI生成
}

// 风险评估 VO
interface RiskAssessmentVO {
  riskAssessments: RiskAssessmentItemVO[];
  operator: string; // 风险评估操作者
  statusName: string; // 风险评估-名称
  statusCode: number; // 审核状态-Code
  rejectReason: string; // 风险评估-驳回原因
  isApproved: boolean; // 是否审核通过
}
// 风险评估提交返回结果
interface RiskAssessmentSubmitData {
  result: boolean;
  message: string;
}
interface HealthTag {
  tagId: number;
  tagName: string;
  subTags: subTagItem[];
}
interface subTagItem {
  pid: number;
  tagId: number;
  tagName: string;
  checked: boolean;
  isCustom?: boolean; // 是否为用户自定义标签
}

// 报告对比列表接口返回类型
type ReportCompareListResult = BaseApiResponse<ReportCompareSelectVO[]>;

// 风险评估列表返回类型
type RiskAssessmentListResult = BaseApiResponse<RiskAssessmentVO[]>;

// 风险评估提交返回类型
type RiskAssessmentSubmitResult = BaseApiResponse<RiskAssessmentSubmitData>;

// 健康标签列表返回类型
type HealthTagListResult = BaseApiResponse<HealthTag[]>;

export type {
  HealthTag,
  HealthTagListResult,
  ReportCompareListResult,
  ReportCompareSelectVO,
  RiskAssessmentItemVO,
  RiskAssessmentListResult,
  RiskAssessmentSubmitResult,
  subTagItem
};
